-
-
Notifications
You must be signed in to change notification settings - Fork 58
Added a PartialOrder transform #444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5421a34
to
898c92f
Compare
Added to documentation too now. Please let me know if anything needs doing/improving |
@zaxtax Yes, let's try to get this one done next :) I spent some time improving it further, adding a nice example to the documentation. |
I think this relates to a larger refactor of making initvals live more on
the sampler than distribution and transform objects
pymc-devs/pymc#7528
…On Thu, 17 Apr 2025, 10:22 Margus Niitsoo, ***@***.***> wrote:
@zaxtax <https://github.com/zaxtax> Yes, let's try to get this one done
next :)
I spent some time improving it further, adding a nice example to the
documentation.
I can't seem to figure out why the docustring for 'initvals' is not
incorporated into the documentation, however. Maybe you can help with that?
—
Reply to this email directly, view it on GitHub
<#444 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACCUOQHL2JJPO6WCFVKHT2Z5QD3AVCNFSM6AAAAAB2D7IMLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJSGE2TINJSGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
*velochy* left a comment (pymc-devs/pymc-extras#444)
<#444 (comment)>
@zaxtax <https://github.com/zaxtax> Yes, let's try to get this one done
next :)
I spent some time improving it further, adding a nice example to the
documentation.
I can't seem to figure out why the docustring for 'initvals' is not
incorporated into the documentation, however. Maybe you can help with that?
—
Reply to this email directly, view it on GitHub
<#444 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACCUOQHL2JJPO6WCFVKHT2Z5QD3AVCNFSM6AAAAAB2D7IMLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJSGE2TINJSGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Interesting development. But I don't think its easy to incorporate transforms into it, as they can interact with the distribution they are transforming in weird ways. Case in point is the one here. For instance, if the underlying distribution has to be positive, we would need initvals that are both positive and respect the partial order provided. Current solution here is to allow .initvals fn to take lower and upper as parameters, so it can spit out values that are consistent with both. But the user still needs to be able to tell it that this is the case :) |
__all__ = ["PartialOrder"] | ||
|
||
|
||
# Find the minimum value for a given dtype |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments should probably just be docstrings in the functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I can't seem to get this merged. Can you try rebasing from |
This is an implementation of a partial order transform as discussed in https://discourse.pymc.io/t/feature-proposal-poset-order-transform/16753/7
I have tried to make it as generic as possible:
As I am new to contributing to both pymc and pymc-extras, I will likely need some help to get it acceptable.
So far, I have added the code and tests for it, but I don't know how to handle documentation yet.
Also anything else that might need to happen before this can be merged.